<template>
  <div class="ta mt40">
    <el-pagination
      layout="  prev, pager, next "
      :page-size="page_size"
      @current-change="current_change"
      :current-page.sync="currentPage"
      :pager-count="5"
      :total="info.total"
      v-if="info.pages > 1"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {
      info: [], //数据
      page_size: 12, //每页多少数据
      currentPage: 1, //默认当前页为第一页
    };
  },

  methods: {
    current_change(currentPage) {
      //改变当前页
      this.currentPage = currentPage;
    },
  },
};

</script>
